package com.vehicle_demo.entity;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * 车辆信息表
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class VehicleInfo {

    @Min(value = 1, message = "id必须是正数")
    private int id;

    @NotEmpty(message = "VID不能为空")
    private String vid;

    @NotEmpty(message = "车ID不能为空")
    private String carId;

    @NotEmpty(message = "电池类型不能为空")
    private String battery_Type;

    @Min(value = 0, message = "总里程不能为负数")
    private int total_mileage;

    @Min(value = 0, message = "电池健康度必须在0到100之间")
    @Max(value = 100, message = "电池健康度必须在0到100之间")
    private int battery_health;


}
